<?php                                                                                                    

class Exhibitions extends Controller {

	function Exhibitions()
	{
		parent::Controller();	
        $this->load->model('exhibitionsmodel'); 
	}
	
    function index()
    {                                                                      
                              
        //load page description
        $this->load->model('pageheadersmodel'); 
        $data["header"] = $this->pageheadersmodel->get_header('exhibitions');  

        //exhibitions list                                          
        $data["grouped_list"] = $this->exhibitionsmodel->get_list();

        $this->load->view('website/default/head', array("document_title" => DOCUMENT_TITLE . "Exhibitions")); 
        $this->load->view('website/default/header');  
        $this->load->view('website/exhibitions/exhibitions', $data);   
        $this->load->view('website/default/footer');   

    }

    function month($month = '')
    {                                                                      

        //load page description
        $this->load->model('pageheadersmodel'); 
        $data["pagedescritpion"] = $this->pageheadersmodel->get_header('exhibitions'); 

        //exhibitions list
        $data["grouped_list"] = $this->exhibitionsmodel->get_list($month); 
        if (empty($data["grouped_list"])) show_404(); 

        //activate layout variant for 'month page'
        $data["use_month_layout"] = TRUE;

        $this->load->view('website/default/head', array("document_title" => DOCUMENT_TITLE . "Exhibitions")); 
        $this->load->view('website/default/header');  
        $this->load->view('website/exhibitions/exhibitions', $data);   
        $this->load->view('website/default/footer');   

    }

    function view($id = NULL)
    {
                                                               
        $this->load->model('glossarymodel');

        //exhibitions item
        $data["exhibitions_item"] = $this->exhibitionsmodel->get_item($id); 
        if (empty($data["exhibitions_item"])) show_404();                                              

        //exhibitions list
        $data["grouped_list"] = $this->exhibitionsmodel->get_list();      


        $this->load->view('website/default/head', array("document_title" => DOCUMENT_TITLE . "Exhibitions - " .$data["exhibitions_item"]["Title_Exhibitions"]));   
        $this->load->view('website/default/header');  
        $this->load->view('website/exhibitions/exhibitions_detail', $data);   
        $this->load->view('website/default/footer');   

    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */